// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/accesscontrol/api/AccessRecordApi'

import EditClass from '@api/accesscontrol/model/DoorControlReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 改 —————————————————————————————— //

  async edit(one, TIP = '门禁反控') {
    const DTO = CORE.grpcDTO(EditClass, one)
    await CORE.grpc(TIP, CLIENT, 'doorControl', DTO)
    return CORE.grpcOK(TIP)
  },
}
